// 泛型约束
interface LengthObj {
    length: number
}

function logLen<T extends LengthObj>(obj: T) {
    console.log(obj.length)
}
logLen<Array<number>>([1, 2, 3])
logLen<number>(1111)
logLen<string>('1111')

export { }
